#include<iostream>
#include<string>
using namespace std;
string s1, s2;
int main()
{
		while (cin >> s1 >> s2)
		{
			int n = s2.size();
			int res = 0;
			for (int i = 0;i < s1.size();)
			{
				if (s1.substr(i, n) == s2)
				{
					res++;
					i += n;
					continue;
				}
				else i++;
			}
			cout << res << endl;
		}
}